package com.jrh.biz.showroom;

import java.util.List;
import com.jrh.dal.ShowroomDao;
import com.jrh.domain.common.Page;
import com.jrh.domain.entity.Showroom;

/**
 * 样板间服务
 * 
 * @author yout 2012-7-17 下午4:13:12
 */
public class ShowroomServiceImpl implements ShowroomService {

    private ShowroomDao showroomDao;

    public void setShowroomDao(ShowroomDao showroomDao) {
        this.showroomDao = showroomDao;
    }

    @Override
	public Page<Showroom> listShowroomsByCondition(Showroom showroom, Integer start, Integer pageSize) {
    	return showroomDao.listByCondition(showroom, start, pageSize);
	}
    
    //unused
    @Override
    public List<Showroom> listShowroomByCondition(Showroom showroom) {
       // return showroomDao.loadByCondition(showroom);
    	return  showroomDao.findshowroomid();
    }
    
	@Override
	public void addShowroom(Showroom showroom) {
		showroomDao.create(showroom);
	}

    @Override
	public List<Showroom> findshowroomid() {
		return  showroomDao.findshowroomid();
	}

	@Override
	public void delete(Long id) {
		showroomDao.delete(id);
	}

	@Override
	public Showroom getShowroomById(Long id) {
		return showroomDao.getShowroomById(id);
	}

	@Override
	public boolean update(Showroom showroom) {
		return showroomDao.update(showroom);
	}

	@Override
	public List<Showroom> listShowroomsByStyle(String style) {
		return showroomDao.loadByStyle(style);
	}

}
